package com.green.dao.manage.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.green.common.page.Pagination;
import com.green.dao.impl.BaseDaoImpl;
import com.green.dao.manage.OperateLogDao;
import com.green.model.manage.OperateLog;



/**
 * 人员
 * 
 */
@Repository("operateLogDao")
public class OperateLogDaoImpl extends BaseDaoImpl implements OperateLogDao {

	@Override
	public int insertOperateLog(OperateLog ct) {
		return insert("com.green.dao.manage.OperateLogDao.insertOperateLog", ct);
	}

	@Override
	public int updateOperateLog(OperateLog ct) {
		return update("com.green.dao.manage.OperateLogDao.updateOperateLog", ct);
	}

	@Override
	public int deleteOperateLog(Map<String, Object> param) {
		return delete("com.green.dao.manage.OperateLogDao.deleteOperateLog", param);
	}

	@Override
	public OperateLog getOperateLogById(String id) {
		return (OperateLog) super.getSqlSession().selectOne("com.green.dao.manage.OperateLogDao.getOperateLogById",id);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<OperateLog> getOperateLogList(Map<String, Object> param) {
		return (List<OperateLog>) this.selectList("com.green.dao.manage.OperateLogDao.getOperateLogList", param);
	}

	@Override
	public Pagination<OperateLog> getOperateLogPagination(
			Pagination<OperateLog> pag, Map<String, Object> param) {
		return selectList("com.green.dao.manage.OperateLogDao.getOperateLogPagination", param, pag);
	}
	
	
}
